#ifndef PAGEMAINTBATTERY_H
#define PAGEMAINTBATTERY_H

#include <QWidget>
#include <QLabel>
#include "global_def.h"

namespace Ui {
class PageMaintBattery;
}

class PageMaintBattery : public QWidget
{
    Q_OBJECT

public:
    explicit PageMaintBattery(QWidget *parent = nullptr);
    ~PageMaintBattery();
    void setBatCoreVolt(uint8_t car, uint8_t index, uint16_t volt);
    void setBatCoreTemp(uint8_t car, uint8_t index, uint16_t temp);
private slots:
    void on_Btn_Return_clicked();
    void on_Btn_Next_clicked();
    void on_Btn_Pre_clicked();

signals:
    void returnToMaintMenu();
private:
    Ui::PageMaintBattery *ui;
    QWidget *widget[2];
    QList<QLabel *> BatCoreVolt[2];
    QList<QLabel *> LabelBatVoltNum[2];
    QList<QLabel *> BatCoreTemp[2];
    QList<QLabel *> LabelBatTempNum[2];
    void initPages();
    int currentPage;
};

#endif // PAGEMAINTBATTERY_H
